1. Field of the Invention
This invention relates to microprocessor development systems, and more particularly to a Universal Serial Bus (xe2x80x9cUSBxe2x80x9d) microcontroller development system configured to aid in the design, debug, and testing of USB compliant devices and firmware.
2. Discussion of Background
USB is a peripheral bus standard that allows computer peripherals to be attached to a personal computer without the need for specialized cards or other vendor specific hardware attachments. The USB standard specifies a common configuration for the connection of well known peripherals such as CD-ROM, tape and floppy disk drives, scanners, printers, keyboards, joysticks, mice, telephones, modems, etc. In addition to well known peripheral devices, the USB standard has flexibility to accommodate less known and newly developed technologies. Information about the USB standard, including the specification for building USB compliant devices, is currently available free of charge over the Internet.
Developers wishing to implement USB devices must build that device to the USB standard. Prior to fabricating IC""s for USB standard devices, a developer will spend a significant amount of resources in testing and refinement of prototypes. An efficient method for testing USB compliant devices is needed to reduce the costs associated with prototype development and testing of those devices.
The design and manufacture of electronic devices such as counters, state machines, specialized registers, and microprocessors is currently aided by technologies that allow engineers to specify design characteristics of a circuit, such as storage device size, register types, connections and associated logic, in a Hardware Description Language (xe2x80x9cHDLxe2x80x9d). This source code or HDL is then compiled, allowing the electronic device to be simulated and debugged while implementing the specified circuit characteristics. Once the operation of device is verified, the compiled source code can be mapped to a specific architecture such as Application Specific Integrated Circuits (xe2x80x9cASICsxe2x80x9d) or Field Programmable Gate Arrays (xe2x80x9cFPGAsxe2x80x9d). This allows the system designer to produce a device with design flexibility and portability into various architecture families.
As an example, a 3-bit shift register can be implemented in a HDL such as Register Transfer Language (xe2x80x9cRTLxe2x80x9d) with the following RTL statements:
which defines the inputs and outputs of the shifter and then maps those bits to a series of D Flip-Flops. After compiling the source code and debugging the circuit, a netlist can be generated for a specific family of FPGA or ASIC devices to produce the circuit with the desired functionality.
Accordingly, one object of the present invention is to provide a flexible USB microcontroller development system that allows for testing of USB compliant devices. The microcontroller includes a microprocessor with instruction RAM, a controller with a computer interface (e.g., RS-232) to a personal computer or other external computing device, data RAM, USB logic and registers for interfacing to a USB host computer, and I/O logic and registers for interfacing to an I/O device. The USB microcontroller development system includes the microcontroller, an external computer, a USB host computer, and an I/O device. The USB microcontroller development system allows both the microprocessor or an attached external computer to control the microcontroller. This is accomplished by mapping the USB microcontroller system state which includes the contents of the data RAM, the microprocessors system state registers including system state registers corresponding to the contents of the instruction RAM, the USB logic registers, and the I/O logic registers to a system bus. The controller or microprocessor places address, data, and control signals on the system bus which are decoded by various logic to allow reading or writing of the system state. The controller reads or writes the instruction RAM by reading or writing a program counter and an instruction register, included as part of the microprocessor""s system state registers, via the system bus. Accordingly, the external computer connected to the controller via the RS-232 bus can read or write the USB microcontroller system state to aid in the design, debug, and testing of USB compliant devices and firmware.
It is also an object of the present invention to provide a development access device on the external computer for providing a user a graphical interface for controlling the USB microcontroller. The development access device displaying menus, buttons, text boxes etc. corresponding to the microprocessor""s system state registers, the contents of the instruction RAM, the USB logic registers, and the I/O logic registers. The user, after selecting the appropriate menu, button, or filling in the appropriate text box, can read or write the corresponding microprocessor""s system state registers, the contents of the instruction RAM, the USB logic registers, and the I/O logic registers via the external computer and computer interface to control the USB microcontroller.
It is yet another object of the present invention to provide a method for implementing the above USB microcontroller development system utilizing a Hardware Description Language. By utilizing a Hardware Description Language, the design engineers are free to concentrate on the design of important features of the system and it""s functionality rather than a gate level implementation of the system. After determining top level characteristics and functional blocks of the system, an HDL program describing those characteristics and functional blocks is developed and debugged. In the present invention, HDL implemented processes are used in designing various functional blocks of the USB microcontroller development system. The USB microcontroller development system designed using HDL is then mapped to FPGAs and packaged onto a single printed circuit board along with minimal additional logic such as EEPROMs and RAM.
The above and other objects are achieved according to the present invention by providing a new and improved microcontroller including a system bus; a microprocessor coupled to the system bus and configured to transfer data and control signals over the system bus; a memory device coupled to the microprocessor and mapped to the system bus and configured to store microprogram instructions for execution by the microprocessor; a controller coupled to the system bus and configured to transfer data and control signals to the microprocessor over the system bus; a host interface coupled to the system bus and configured to interface to a host computer and receive the data and the control signals over the system bus from the microprocessor; and an I/O interface coupled to the system bus and configured to interface to at least one I/O device and receive the data and the control signals over the system bus from the microprocessor.
According to a second aspect of the present invention, there is provided a method of fabricating a microcontroller including steps of determining functional microprocessor requirements that will at least provide execution control of the microprocessor; determining functional control circuit requirements that will at least provide control of the microprocessor; determining functional host interface requirements that will at least provide an interface to a host computer; determining functional I/O interface requirements that will at least provide an interface to at least one I/O device; defining the functional requirements of the microprocessor, the control circuit, the host interface and the I/O interface in an Hardware Description Language (HDL); compiling the HDL language to derive a circuit representation of the microcontroller; and mapping the circuit representation onto one or more devices.
According to a third aspect of the present invention, there is provided a microcontroller development system including a system bus; a microprocessor coupled to the system bus and configured to transfer data and control signals over the system bus; a memory device coupled to the microprocessor and mapped to the system bus and configured to store microprogram instructions for execution by the microprocessor; an external computing device; a controller coupled to the system bus and configured to transfer data and control signals to the microprocessor over the system bus including a computer interface coupled to the system bus and configured to transfer commands from the external computing device to the controller, the commands used by the controller to generate the data and the control signals for controlling the microprocessor; a host interface coupled to the system bus and configured to interface to the external computing device and receive the data and the control signals over the system bus from the microprocessor; at least one I/O device; and an I/O interface coupled to the system bus and configured to interface to the at least one I/O device and receive the data and the control signals over the system bus from the microprocessor.
According to a fourth aspect of the present invention, there is provided a method of development of a microcontroller in a microcontroller development system, including steps of loading a set of microprocessor instructions into a memory device coupled to a microprocessor of the microcontroller, the instructions loaded from an external computer coupled to a computer interface of the microcontroller, the external computer directed to load the microprocessor instructions by a developer access device running on the external computer;retrieving the set of microprocessor instructions from the memory device for execution by the microprocessor; and controlling a starting, stopping, and single step execution of the microprocessor instructions by the microprocessor by the developer access device reading and writing at least one register of system state registers of the microprocessor.